home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / demo / medit.zip / MAKEFILE < prev    next >
Text File  |  1994-07-13  |  4KB  |  162 lines

  1.  
  2. # This is a part of the Microsoft Foundation Classes C++ library.
  3. # Copyright (C) 1992 Microsoft Corporation
  4. # All rights reserved.
  5. #
  6. # This source code is only intended as a supplement to the
  7. # Microsoft Foundation Classes Reference and Microsoft
  8. # QuickHelp and/or WinHelp documentation provided with the library.
  9. # See these sources for detailed information regarding the
  10. # Microsoft Foundation Classes product.
  11.  
  12. # Common include for building MFC Sample programs
  13. #
  14. #  typical usage
  15. #       PROJ = foo
  16. #       OBJS = foo.obj bar.obj ...
  17. #       !INCLUDE ..\SAMPLE_.MAK
  18. #
  19. # NOTE: do not include 'stdafx.obj' in the OBJS list - the correctly
  20. #    built version will be included for you
  21. #
  22. # Options to NMAKE:
  23. #     "AFXDLL=1" => build a DLL client app (default static MFC library)
  24. #     "DEBUG=0" => use retail (default debug)
  25. #     "OPT" => use to set custom compile options
  26. #     "BROWSE=1" => build Visual C++ compatible browse file (.BSC file)
  27.  
  28. PROJ = MULTIPAD
  29. OBJS = $(PROJ).obj magmaed.obj mainfrm.obj docview.obj
  30.  
  31. !ifndef PROJ
  32.     !ERROR You forgot to define 'PROJ' !!
  33. !endif
  34. !ifndef OBJS
  35.     !ERROR You forgot to define 'OBJS' !!
  36. !endif
  37.  
  38. !if "$(DEBUG)"!="0"
  39. DEBUGSUF=D
  40. !endif
  41.  
  42. !if "$(AFXDLL)"!="1"
  43. # static link library variant [medium model] - the default
  44. STDAFX=stdafx
  45. CPPMAIN_FLAGS=/AM /Zp /GA /G2 /Gyf /Ig:\mewin
  46. LIBS=mlibcew
  47. AFXLIB=mafxcw$(DEBUGSUF)
  48. !else
  49. # dynamic link library variant [large model]
  50. STDAFX=stdafxe
  51. CPPMAIN_FLAGS=/AL /Zp /GA /GEf /GEs /Gs /G2 /Gyf /D_AFXDLL /Ig:\mewin
  52. RCFLAGS=$(RCFLAGS) /D_AFXDLL
  53. LIBS=llibcew
  54. AFXLIB=mfc250$(DEBUGSUF)
  55. !ifdef USES_OLE
  56. AFXLIB=$(AFXLIB) mfco250$(DEBUGSUF)
  57. !endif
  58. !ifdef USES_DB
  59. AFXLIB=$(AFXLIB) mfcd250$(DEBUGSUF)
  60. !endif
  61. !endif #//AFXDLL
  62.  
  63. !ifdef USES_VBX
  64. # special settings for VBX enabled apps
  65. STACK=/STACK:20480
  66. !else
  67. STACK=/STACK:10240
  68. !endif
  69.  
  70. !ifdef USES_OLE
  71. # special settings for OLE enabled apps
  72. WIN31ONLY=1
  73. STACK=/STACK:12288
  74. LIBS=$(LIBS) mfcoleui compobj storage ole2 ole2disp
  75. !endif
  76.  
  77. !ifdef USES_DB
  78. LIBS=$(LIBS) odbc
  79. !endif
  80.  
  81. !if "$(DEBUG)"!="0"
  82. # debug variant - the default
  83. CPPMAIN_FLAGS=/D_DEBUG $(CPPMAIN_FLAGS) /Od /Z7
  84. LINKFLAGS=/NOD /ONERR:NOEXE $(STACK) /CODEVIEW
  85. STDAFX=$(STDAFX)d
  86. !else
  87. # retail variant
  88. CPPMAIN_FLAGS=$(CPPMAIN_FLAGS) /O1
  89. LINKFLAGS=/AL:16 /NOD /ONERR:NOEXE $(STACK)
  90. !endif #//DEBUG
  91.  
  92. !if "$(VBX)"!=""
  93. CPPMAIN_FLAGS=$(CPPMAIN_FLAGS) /DUSE_VBX
  94. !endif
  95.  
  96. !if "$(OPT)"!=""
  97. CPPMAIN_FLAGS=$(CPPMAIN_FLAGS) $(OPT)
  98. !endif
  99.  
  100. LIBS=$(AFXLIB) $(LIBS) libw commdlg shell $(EXTRA_LIBS)
  101. CPPFLAGS=$(CPPMAIN_FLAGS) /W3 /Yustdafx.h /Fp..\$(STDAFX).pch $(EXTRA_FLAGS)
  102.  
  103. !if "$(BROWSE)"=="1"
  104. CPPFLAGS=$(CPPFLAGS) /FR
  105. SBRS=$(OBJS:.obj=.sbr)
  106. all: $(PROJ).exe $(PROJ).bsc
  107. !endif
  108.  
  109. #############################################################################
  110.  
  111. $(PROJ).exe: ..\$(STDAFX).obj $(PROJ).res $(PROJ).def $(OBJS)
  112.     link $(LINKFLAGS) @<<
  113. $(OBJS) ..\$(STDAFX).obj,
  114. $(PROJ),NUL,$(LIBS),$(PROJ).def;
  115. <<
  116.     rc /31 /k /t $(PROJ).res
  117.  
  118. $(OBJS): ..\$(STDAFX).pch
  119.  
  120. $(PROJ).res:  resource.h
  121.     rc /r /z $(RCFLAGS) $(PROJ).rc
  122.  
  123. $(PROJ).bsc: $(SBRS) ..\$(STDAFX).sbr
  124.     bscmake @<<
  125. /o$@ $(SBRS) ..\$(STDAFX).sbr
  126. <<
  127.  
  128. clean::
  129.     -erase $(PROJ).exe
  130.     -erase $(PROJ).res
  131.     -erase $(PROJ).bsc
  132.     -erase *.aps
  133.     -erase *.pdb
  134.     -erase *.pch
  135.     -erase *.map
  136.     -erase *.obj
  137.     -erase *.sbr
  138.  
  139. #############################################################################
  140. # Shared PCH and PCT files (shared by all samples)
  141.  
  142. ..\$(STDAFX).obj ..\$(STDAFX).pch ..\$(STDAFX).sbr:: ..\stdafx.h ..\stdafx.cpp
  143.     @echo.
  144.     @echo Building shared Pre-Compiled Header/Type files.
  145.     @echo.
  146. !if "$(BROWSE)"=="1"
  147.     $(CPP) @<<
  148. $(CPPMAIN_FLAGS) /W4 /Ycstdafx.h /FR..\$(STDAFX).sbr /Fp..\$(STDAFX).pch /Fo..\$(STDAFX).obj /c ..\stdafx.cpp
  149. <<
  150. !else
  151.     $(CPP) @<<
  152. $(CPPMAIN_FLAGS) /W4 /Ycstdafx.h /Fp..\$(STDAFX).pch /Fo..\$(STDAFX).obj /c ..\stdafx.cpp
  153. <<
  154. !endif
  155.  
  156. cleanall: clean
  157.     -erase ..\$(STDAFX).pch
  158.     -erase ..\$(STDAFX).obj
  159.     -erase ..\$(STDAFX).sbr
  160.  
  161. #############################################################################
  162.